package com.lp.bo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.lp.annotation.Code;
import com.lp.bean.IotNodeInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.codehaus.jackson.map.annotate.JsonSerialize;

import java.util.Arrays;
import java.util.List;

/**
 *@类:IotNodeInfo
 *@作者:chenrj
 */

@Data
@NoArgsConstructor
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) 
@EqualsAndHashCode(callSuper = false)
@ExcelIgnoreUnannotated
@ColumnWidth(value = 30)
public class IotNodeInfoBO extends IotNodeInfo {

	public IotNodeInfoBO(Integer id) {
		super();
		this.setId(id);
	}

	//我不是很确定，大概是这样,不一定是String类型，看数据库里面是那个类型
	 private Integer iot_node_status;
	@ExcelProperty(value = "Project Name")
	 private String scene_name;
	 
	 private String lpmKey ;
	
//	 private Integer device_template_id ;
//	 
//	 private String template_name ;
	 
	 @Code
	 private List<IotSensorInfoBO> iotSensorList ;
	 
	 // 设备下 数据传感点，或者配置传感点
	 private Integer node_data_type ; // 0 ,1配置
	 
	 private String copy_device_code ;
	@ExcelProperty(value = "Device communication protocol")
	 private String iot_node_type_name ;
	@ExcelProperty(value = "Data Protocol")
	private String iot_protocal_category_name;
	private Integer pCode;
	private String ids;

	public static List<IotNodeInfoBO> generateExample() {
		IotNodeInfoBO resourceDtoExplain = getResourceExplain();
		IotNodeInfoBO resourceDtoExample = new IotNodeInfoBO();
//		resourceDtoExample.setName("iaastest");
		return Arrays.asList(resourceDtoExplain, resourceDtoExample);
	}

	protected static IotNodeInfoBO getResourceExplain() {
		IotNodeInfoBO iotNodeInfoBO = new IotNodeInfoBO();
//		iotNodeInfoBO.setName("注：标红列为必填项，导入时将示例数据删除。若导入的监控需求资源信息已存在，请正确填写资源标识、IP地址、资源厂商");
		return iotNodeInfoBO;
	}
 }

